package com.ruoyi.a2.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.a2.mapper.AisDynamicsInfoMapper;
import com.ruoyi.a2.domain.AisDynamicsInfo;
import com.ruoyi.a2.service.IAisDynamicsInfoService;

/**
 * AIS动态信息Service业务层处理
 *
 * @author ruoyi
 * @date 2025-02-20
 */
@Service
public class AisDynamicsInfoServiceImpl extends ServiceImpl<AisDynamicsInfoMapper, AisDynamicsInfo> implements IAisDynamicsInfoService
{
    @Autowired
    private AisDynamicsInfoMapper aisDynamicsInfoMapper;

    /**
     * 查询AIS动态信息
     *
     * @param id AIS动态信息主键
     * @return AIS动态信息
     */
    @Override
    public AisDynamicsInfo selectAisDynamicsInfoById(Long id)
    {
        return aisDynamicsInfoMapper.selectAisDynamicsInfoById(id);
    }

    /**
     * 查询AIS动态信息列表
     *
     * @param aisDynamicsInfo AIS动态信息
     * @return AIS动态信息
     */
    @Override
    public List<AisDynamicsInfo> selectAisDynamicsInfoList(AisDynamicsInfo aisDynamicsInfo)
    {
        return aisDynamicsInfoMapper.selectAisDynamicsInfoList(aisDynamicsInfo);
    }

    /**
     * 新增AIS动态信息
     *
     * @param aisDynamicsInfo AIS动态信息
     * @return 结果
     */
    @Override
    public int insertAisDynamicsInfo(AisDynamicsInfo aisDynamicsInfo)
    {
        aisDynamicsInfo.setCreateTime(DateUtils.getNowDate());
        return aisDynamicsInfoMapper.insertAisDynamicsInfo(aisDynamicsInfo);
    }

    /**
     * 修改AIS动态信息
     *
     * @param aisDynamicsInfo AIS动态信息
     * @return 结果
     */
    @Override
    public int updateAisDynamicsInfo(AisDynamicsInfo aisDynamicsInfo)
    {
        aisDynamicsInfo.setUpdateTime(DateUtils.getNowDate());
        return aisDynamicsInfoMapper.updateAisDynamicsInfo(aisDynamicsInfo);
    }

    /**
     * 批量删除AIS动态信息
     *
     * @param ids 需要删除的AIS动态信息主键
     * @return 结果
     */
    @Override
    public int deleteAisDynamicsInfoByIds(Long[] ids)
    {
        return aisDynamicsInfoMapper.deleteAisDynamicsInfoByIds(ids);
    }

    /**
     * 删除AIS动态信息信息
     *
     * @param id AIS动态信息主键
     * @return 结果
     */
    @Override
    public int deleteAisDynamicsInfoById(Long id)
    {
        return aisDynamicsInfoMapper.deleteAisDynamicsInfoById(id);
    }
}
